security(cli): prefer file/stdin/env over --private-key argv (#4032) - #4096
security(cli): prefer file/stdin/env over --private-key argv (#4032)#4096Chessing234 wants to merge 6 commits into
Conversation
5a71669 to
62b1396
Compare
|
Rebased with |
|
Friendly review ping for @block/buzz-oss-team — CI/DCO are green on the latest push and this is ready for a maintainer pass when you have bandwidth. Happy to rebase or split if that helps review. |
Implements preference order and argv detection so --private-key can be deprecated without dropping BUZZ_PRIVATE_KEY support (block#4032). Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Taksh <takshkothari09@gmail.com>
Wires the new flags through clap and run(), warning when the secret is passed on argv into shell history / process listings. Signed-off-by: Taksh <takshkothari09@gmail.com>
Documents the safer identity sources and links block#4032 for the argv leak. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Taksh <takshkothari09@gmail.com>
Cross-links block#4032 next to the existing BUZZ_PRIVATE_KEY keyring guidance. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Taksh <takshkothari09@gmail.com>
Keeps the manual test script aligned with the safer auth sources. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Taksh <takshkothari09@gmail.com>
Keeps agent docs aligned with the block#4032 argv deprecation. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Taksh <takshkothari09@gmail.com>
62b1396 to
e9ee13a
Compare
|
Rebased onto latest |
|
@tlongwell-block @wesbillman @wpfleger96 mind taking a look when you get a chance? |
|
still green on tip — this one is the argv private-key leak fix. @tlongwell-block if you get a spare slot on security-ish cli stuff, a look would help a lot. |
|
@atishpatel @michaelneale if you have a minute — this is the --private-key argv leak fix (#4032). small, focused, dco green. a quick look would help a lot. |
Summary
--private-key-fileand--private-key-stdin; keepsBUZZ_PRIVATE_KEY.--private-keyappears on argv (shell history /ps).Fixes #4032
Test plan
cargo test -p buzz-cli private_keycargo test -p buzz-cli cli_definition_is_validbuzz --private-key-file /tmp/nsec channels list(with valid key)printf '%s' "$NSEC" | buzz --private-key-stdin channels listbuzz --private-key nsec1… …prints deprecation warningMade with Cursor